package com.example.demo;

import com.example.demo.config.MyRegistrar;
import com.example.demo.principle.component.BeanLifeComponet;
import com.example.demo.principle.mapper.UserInfoMapper;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Import;

//@Import(MyImportSelector.class)
//@Import(TestConfig.class)
//@ComponentScan("com.example.demo.config")
//@EnableLiangConfig
@ComponentScan("com.example.demo.principle.component")
@Import(MyRegistrar.class)
@SpringBootApplication()
//(exclude = "...")
public class SpringReviewApplication {

	public static void main(String[] args) {
		//ApplicationContext context来获取对象，如果其他的类也想拿到ApplicationContext对象 去test里面，直接注入即可
		ApplicationContext context = SpringApplication.run(SpringReviewApplication.class, args);
		BeanLifeComponet bean = context.getBean(BeanLifeComponet.class);
		UserInfoMapper us = context.getBean(UserInfoMapper.class);

	}

}
